package java101;


import junit.framework.TestCase;


	public class LongitudeTest extends TestCase {

	public void testLongitude() {
		Longitude primemeridian = new Longitude (0.);
		assertEquals(0., primemeridian.getDegLon());
		Longitude quarter = new Longitude(90.);
		assertEquals(90., quarter.getDegLon());	
		Longitude half = new Longitude(180.);
		assertEquals(180., half.getDegLon());	
	}
		
	public void testOutOfRange() {
		try {
			Longitude OutOfRangeMin = new Longitude(-180.1);
			fail("Should have thrown exception");
		} catch (IllegalArgumentException e) {
			//passed
		}
		try {
			Longitude OutOfRangeMax = new Longitude(180.1);
			fail("Should have thrown exception");
		} catch (IllegalArgumentException e) {
			//passed
		}
	}
	}